import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:todo/models/models.dart';

import 'pages/pages.dart';

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MultiProvider(
      providers: [
        ChangeNotifierProvider<NTheme>(builder: (_) => NTheme()),
        ChangeNotifierProvider<NTodoList>(builder: (_) => NTodoList()),
      ],
      child: Consumer<NTheme>(
        builder: (context, theme, _) => MaterialApp(
          title: "Todo",
          theme: theme.theme,
          routes: {"/": (_) => HomePage()},
        ),
      ),
    );
  }
}
